home *** CD-ROM | disk | FTP | other *** search
/ Learn Microsoft Visual Basic 6.0 Now / Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO / media / chap01 / b01a020.cc2 < prev    next >
Text File  |  1998-06-07  |  2KB  |  46 lines

  1. 0, The hottest spot in the casino is always 
  2. 3, the slot machine pit. And the king of 
  3. 5, one-armed bandits is Lucky Seven, a slot 
  4. 8, machine that randomly displays numbers 
  5. 9, in a bank of three or more spinning 
  6. 11, windows. Lucky Seven is not a good way to 
  7. 14, make a living, but it's a great way to 
  8. 16, challenge Lady Luck. If one or more sevens 
  9. 18, appear in the spinner windows, 
  10. 20, bingo! You've hit the jackpot!! To create a 
  11. 23, computer version of the Lucky Seven slot 
  12. 25, machine, you need to think carefully about 
  13. 27, the basic features of the Lucky Seven 
  14. 28, game. The best way to chart the mission of 
  15. 31, your program is to create an algorithm, 
  16. 34, an ordered list of steps that your 
  17. 35, program should follow. The Lucky Seven 
  18. 38, program should complete four tasks. First, it 
  19. 42, should display a welcoming user 
  20. 43, interface with control buttons, spinner windows, 
  21. 46, and a mechanism for announcing a win. 
  22. 49, Second, it should have the ability to 
  23. 51, pick three random numbers and display them 
  24. 53, in the spinner windows when the user 
  25. 55, clicks Spin. Third, Lucky Seven should 
  26. 58, announce a jackpot by displaying a stack of 
  27. 60, casino coins and beeping when a seven 
  28. 63, appears. Finally, Lucky Seven should stop 
  29. 66, when the user clicks the End button. 
  30. 71, This basic algorithm translates into three 
  31. 73, fundamental programming steps in Visual 
  32. 74, Basic: creating the user interface, 
  33. 77, setting the properties, and writing the 
  34. 79, code. To build the user interface, I'll 
  35. 82, create seven objects on a form with tools in 
  36. 84, the Visual Basic toolbox. To set the 
  37. 87, properties, I'll customize the objects 
  38. 89, with 10 property settings. Finally, I'll 
  39. 92, use the Code window to write program code 
  40. 94, for the two control buttons on the form, 
  41. 96, Spin and End. Roughing out these basic 
  42. 100, planning steps is always a good way to 
  43. 102, start the software development process. 
  44. 105, With a solid algorithm in place, you're 
  45. 107, ready to get started!
  46. 110, END